Spectrometry Terms;
1.) Hue: color or shade. It has reddish hues. Degree to which a stimulus can be described as similar or different from described stimuli. Dependent on the dominant wavelength, independent of intensity or lightness.
2.) Chroma: the vividness or dullness of a color; how close the color is to either gray or the pure hue (red). Chroma describes how pure, or monochromatic, a color is compared to a white surface with the same illumination
3.) Saturation: the degree of purity of a hue
4.) Spectral purity: quantification of the monochromaticity of a given light sample; stability of a signal; how clean a spectrum is compared to what it should be.
5.) Brightness: measures the ability to of a sample to reflect blue light; lower brightness values mean greater pigmentation; measures the reflection of a very specific wavelength of light.
6.) Spectral Whiteness: Measures the ability to reflect all colors of light….remember things like sand reflect light; measures the reflection of all wavelengths of light across the visible spectrum thus this measure is more in line without visual perception.
7.) A tint is created when any saturated hue on a spectrum is mixed with white to form a lighter color.
color_data <- read.csv("color_data.csv")
ggpairs(color_data, columns = 2:5) + theme_bw()
correlation.matrix <- cor(color_data[,2:5])
round(correlation.matrix, 2)
## Red_Coloration_Area Whiteness_Avg Chroma_Avg Tint_Avg
## Red_Coloration_Area 1.00 -0.72 0.70 -0.79
## Whiteness_Avg -0.72 1.00 -0.93 0.95
## Chroma_Avg 0.70 -0.93 1.00 -0.96
## Tint_Avg -0.79 0.95 -0.96 1.00
Correlation between the variables. Anything above ~0.5 we should look at.
options(na.action = “na.fail”)
options(width = 90)
Now running lm with additive effects of the variables in relation to GSI_Value.
model_GSI1 <- lm(GSI_Value ~ Red_Coloration_Area + Whiteness_Avg + Chroma_Avg + Tint_Avg, data=color_data)
anova (model_GSI1)
## Analysis of Variance Table
##
## Response: GSI_Value
## Df Sum Sq Mean Sq F value Pr(>F)
## Red_Coloration_Area 1 21.46 21.4641 0.7686 0.3911
## Whiteness_Avg 1 12.36 12.3636 0.4427 0.5134
## Chroma_Avg 1 5.84 5.8416 0.2092 0.6523
## Tint_Avg 1 9.80 9.8043 0.3511 0.5602
## Residuals 20 558.54 27.9271
performance::check_collinearity(model_GSI1)
## # Check for Multicollinearity
##
## Low Correlation
##
## Term VIF Increased SE Tolerance
## Red_Coloration_Area 3.01 1.73 0.33
##
## High Correlation
##
## Term VIF Increased SE Tolerance
## Whiteness_Avg 10.85 3.29 0.09
## Chroma_Avg 13.57 3.68 0.07
## Tint_Avg 23.36 4.83 0.04
Red Coloration Area has a VIF <5 showing low correlation with other predictors.
Dredge out models from the previous linear model for EXPLORATORY PURPOSE ONLY.
options(na.action = "na.fail") # otherwise blows up with NA values
dredge_GSI<-dredge(model_GSI1)
## Fixed term is "(Intercept)"
dredge_GSI
## Global model call: lm(formula = GSI_Value ~ Red_Coloration_Area + Whiteness_Avg +
## Chroma_Avg + Tint_Avg, data = color_data)
## ---
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Tnt_Avg Wht_Avg df logLik AICc delta weight
## 1 5.892 2 -75.365 155.3 0.00 0.254
## 5 8.235 0.02747 3 -74.653 156.4 1.17 0.142
## 9 8.619 0.02325 3 -74.660 156.5 1.19 0.140
## 3 7.488 -0.112800 3 -74.916 157.0 1.70 0.109
## 2 8.000 -0.08171 3 -74.933 157.0 1.73 0.107
## 6 7.336 0.20740 0.07968 4 -74.399 158.8 3.52 0.044
## 10 8.470 0.11450 0.04717 4 -74.544 159.1 3.81 0.038
## 13 8.475 0.01544 0.01080 4 -74.637 159.3 4.00 0.034
## 11 8.625 -0.024740 0.02032 4 -74.649 159.3 4.02 0.034
## 7 8.237 -0.002365 0.02711 4 -74.653 159.3 4.03 0.034
## 4 8.056 -0.04589 -0.069270 4 -74.845 159.7 4.41 0.028
## 14 7.741 0.24020 0.06050 0.02463 5 -74.322 161.8 6.53 0.010
## 8 7.198 0.22880 0.044630 0.09195 5 -74.374 161.9 6.63 0.009
## 12 8.470 0.12100 -0.035610 0.04430 5 -74.522 162.2 6.93 0.008
## 15 8.494 -0.008612 0.01358 0.01128 5 -74.636 162.4 7.15 0.007
## 16 7.607 0.25670 0.037330 0.07166 0.02349 6 -74.304 165.3 10.00 0.002
## Models ranked by AICc(x)
Here we see there are 16 possible models based on additive combinations of the variables.
Let’s dredge models for a delta <2/ within two AICc units.
subset(dredge_GSI, delta <2)
## Global model call: lm(formula = GSI_Value ~ Red_Coloration_Area + Whiteness_Avg +
## Chroma_Avg + Tint_Avg, data = color_data)
## ---
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Tnt_Avg Wht_Avg df logLik AICc delta weight
## 1 5.892 2 -75.365 155.3 0.00 0.338
## 5 8.235 0.02747 3 -74.653 156.4 1.17 0.188
## 9 8.619 0.02325 3 -74.660 156.5 1.19 0.187
## 3 7.488 -0.1128 3 -74.916 157.0 1.70 0.145
## 2 8.000 -0.08171 3 -74.933 157.0 1.73 0.142
## Models ranked by AICc(x)
Model 1 is about 1.8 times more likely than model 5 and model 9 (0.338/0.188) and (0.338/0.187). Model 1 is about 2.33 times more likely than model 3 (0.338/0.145). Model 1 is about 2.38 times more likely than model 2.
*Model 5 has support for tint average, model 9 has support for whiteness average, model 3 has support for red coloration area, and model 2 has support for chroma average.
Now let’s rank variables support in the models above. This calculates variable importance weights.
importance(dredge_GSI)
## Tint_Avg Whiteness_Avg Chroma_Avg Red_Coloration_Area
## Sum of weights: 0.281 0.273 0.245 0.231
## N containing models: 8 8 8 8
The results of importance show that each of the four variables show up 8 times in the models.
Based on the effects of variables in the models using subset(dredge_wash, delta <2) and some other combinations, I ran the following lm:
model1 <- lm(GSI_Value~Chroma_Avg+Red_Coloration_Area, data = color_data)
model2 <- lm(GSI_Value~Whiteness_Avg+Chroma_Avg, data = color_data)
model3 <- lm(GSI_Value~Red_Coloration_Area+Tint_Avg, data = color_data)
model4 <- lm(GSI_Value~Whiteness_Avg+Chroma_Avg+Tint_Avg, data= color_data)
model5 <- lm(GSI_Value~ Whiteness_Avg+Tint_Avg, data= color_data)
model6 <- lm(GSI_Value~ Tint_Avg, data= color_data)
model7 <- lm(GSI_Value~ Whiteness_Avg, data= color_data)
model8 <- lm(GSI_Value~Red_Coloration_Area, data= color_data)
model9 <- lm(GSI_Value~ Chroma_Avg, data= color_data)
out.put4<-model.sel(model1,model2,model3, model4, model5, model6, model7, model8, model9)
out.put4
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Wht_Avg Tnt_Avg family df logLik
## model6 8.235 0.02747 gaussian(identity) 3 -74.653
## model7 8.619 0.02325 gaussian(identity) 3 -74.660
## model8 7.488 -0.112800 gaussian(identity) 3 -74.916
## model9 8.000 -0.08171 gaussian(identity) 3 -74.933
## model2 8.470 0.11450 0.04717 gaussian(identity) 4 -74.544
## model5 8.475 0.01080 0.01544 gaussian(identity) 4 -74.637
## model3 8.237 -0.002365 0.02711 gaussian(identity) 4 -74.653
## model1 8.056 -0.04589 -0.069270 gaussian(identity) 4 -74.845
## model4 7.741 0.24020 0.02463 0.06050 gaussian(identity) 5 -74.322
## AICc delta weight
## model6 156.4 0.00 0.221
## model7 156.5 0.02 0.219
## model8 157.0 0.53 0.170
## model9 157.0 0.56 0.167
## model2 159.1 2.64 0.059
## model5 159.3 2.83 0.054
## model3 159.3 2.86 0.053
## model1 159.7 3.24 0.044
## model4 161.8 5.35 0.015
## Models ranked by AICc(x)
Subset for output models, you can see that the models with one variable in them show the most support, with model 6 (y=GSI_Value and x=Tint) as the top model.
subset(out.put4, delta <2)
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Wht_Avg Tnt_Avg family df logLik
## model6 8.235 0.02747 gaussian(identity) 3 -74.653
## model7 8.619 0.02325 gaussian(identity) 3 -74.660
## model8 7.488 -0.1128 gaussian(identity) 3 -74.916
## model9 8.000 -0.08171 gaussian(identity) 3 -74.933
## AICc delta weight
## model6 156.4 0.00 0.284
## model7 156.5 0.02 0.282
## model8 157.0 0.53 0.219
## model9 157.0 0.56 0.215
## Models ranked by AICc(x)
Model 6 is about 1 times more likely than model 7. Model 6 is about 1.30 times more likely than model 8. Model 6 is about 1.32 times more likely than model 9.
Now to average the models using the lm from out.put4
model.avg(out.put4, revised.var = TRUE)
##
## Call:
## model.avg(object = out.put4, revised.var = TRUE)
##
## Component models:
## '4' '3' '2' '1' '13' '34' '24' '12' '134'
##
## Coefficients:
## (Intercept) Tint_Avg Whiteness_Avg Red_Coloration_Area Chroma_Avg
## full 8.164763 0.00924022 0.008823809 -0.02227681 -0.005228465
## subset 8.164763 0.02699481 0.025450803 -0.08373316 -0.018382671
summary(model.avg(out.put4))
##
## Call:
## model.avg(object = out.put4)
##
## Component model call:
## lm(formula = <9 unique values>, data = color_data)
##
## Component models:
## df logLik AICc delta weight
## 4 3 -74.65 156.45 0.00 0.22
## 3 3 -74.66 156.46 0.02 0.22
## 2 3 -74.92 156.97 0.53 0.17
## 1 3 -74.93 157.01 0.56 0.17
## 13 4 -74.54 159.09 2.64 0.06
## 34 4 -74.64 159.27 2.83 0.05
## 24 4 -74.65 159.31 2.86 0.05
## 12 4 -74.84 159.69 3.24 0.04
## 134 5 -74.32 161.80 5.35 0.02
##
## Term codes:
## Chroma_Avg Red_Coloration_Area Whiteness_Avg Tint_Avg
## 1 2 3 4
##
## Model-averaged coefficients:
## (full average)
## Estimate Std. Error Adjusted SE z value Pr(>|z|)
## (Intercept) 8.164763 2.445593 2.579872 3.165 0.00155 **
## Tint_Avg 0.009240 0.029213 0.030548 0.302 0.76228
## Whiteness_Avg 0.008824 0.027575 0.028790 0.306 0.75923
## Red_Coloration_Area -0.022277 0.089330 0.093253 0.239 0.81119
## Chroma_Avg -0.005228 0.101610 0.105943 0.049 0.96064
##
## (conditional average)
## Estimate Std. Error Adjusted SE z value Pr(>|z|)
## (Intercept) 8.16476 2.44559 2.57987 3.165 0.00155 **
## Tint_Avg 0.02699 0.04488 0.04740 0.569 0.56903
## Whiteness_Avg 0.02545 0.04207 0.04436 0.574 0.56612
## Red_Coloration_Area -0.08373 0.15763 0.16595 0.505 0.61387
## Chroma_Avg -0.01838 0.18989 0.19804 0.093 0.92604
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Term Codes for the variables: 1 = Chroma Average, 2 = Red Coloration Area, 3 = Whiteness_Avg, and 4 = Tint_Avg. Look at component models: models 4, 3, 2, and 1 are within two AICc units. Notice interactions and additive representation of these variables leads to higher delta AICc values. The variables show high p-values. From the estimate column, we see a positive effect of Tint_avg and Whiteness_avg and a negative effect of Red Coloration Area and Chroma_avg on GSI_Value. Model 4 (y=GSI_Value and x=Tint_avg) shows most support.
w1 <- ggplot(color_data, aes(Red_Coloration_Area, GSI_Value)) +
geom_point() +
geom_smooth(method="lm")
w2 <- ggplot(color_data, aes(Whiteness_Avg, GSI_Value)) +
geom_point() +
geom_smooth(method="lm")
w3 <- ggplot(color_data, aes(Chroma_Avg, GSI_Value)) +
geom_point() +
geom_smooth(method="lm")
w4 <- ggplot(color_data, aes(Tint_Avg, GSI_Value)) +
geom_point() +
geom_smooth(method="lm")
w1 / w2 / w3 / w4
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
Figure 4. Southern Redbelly Dace (Chrosomus erythrogaster) Body Condition Measurments
ggpairs(body_condition_color, columns = 2:5) + theme_bw()
options(na.action = “na.fail”)
options(width = 90)
Body_Condition.all.parms<-lm(Body_Condition_Factor ~ Red_Coloration_Area + Whiteness_Avg + Chroma_Avg + Tint_Avg, data = body_condition_color)
anova(Body_Condition.all.parms)
## Analysis of Variance Table
##
## Response: Body_Condition_Factor
## Df Sum Sq Mean Sq F value Pr(>F)
## Red_Coloration_Area 1 0.000006 0.0000056 0.0009 0.9763
## Whiteness_Avg 1 0.003683 0.0036834 0.5972 0.4487
## Chroma_Avg 1 0.004704 0.0047038 0.7627 0.3929
## Tint_Avg 1 0.000162 0.0001620 0.0263 0.8729
## Residuals 20 0.123349 0.0061675
results1<-MuMIn::dredge(Body_Condition.all.parms)
## Fixed term is "(Intercept)"
results1
## Global model call: lm(formula = Body_Condition_Factor ~ Red_Coloration_Area + Whiteness_Avg +
## Chroma_Avg + Tint_Avg, data = body_condition_color)
## ---
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Tnt_Avg Wht_Avg df logLik AICc delta
## 1 0.7968 2 30.083 -55.6 0.00
## 9 0.7761 -0.0001772 3 30.268 -53.4 2.23
## 5 0.7866 -0.0001199 3 30.144 -53.1 2.48
## 2 0.7901 0.0002596 3 30.103 -53.1 2.56
## 3 0.7960 5.747e-05 3 30.084 -53.0 2.60
## 10 0.7808 -0.0036420 -0.0009380 4 30.797 -51.6 4.03
## 13 0.7689 0.0007699 -0.0007984 4 30.527 -51.1 4.57
## 11 0.7764 -1.463e-03 -0.0003507 4 30.438 -50.9 4.75
## 6 0.7954 -0.0020240 -0.0006294 4 30.249 -50.5 5.12
## 7 0.7878 -1.157e-03 -0.0002981 4 30.225 -50.4 5.17
## 4 0.7904 0.0004514 -3.710e-04 4 30.114 -50.2 5.39
## 12 0.7808 -0.0034320 -1.155e-03 -0.0010310 5 30.905 -48.7 6.97
## 14 0.7791 -0.0033460 0.0001424 -0.0009910 5 30.803 -48.4 7.17
## 15 0.7705 -7.379e-04 0.0006102 -0.0007571 5 30.560 -48.0 7.66
## 8 0.8008 -0.0028630 -1.745e-03 -0.0011090 5 30.416 -47.7 7.95
## 16 0.7843 -0.0039840 -1.451e-03 -0.0002913 -0.0009466 6 30.922 -45.2 10.44
## weight
## 1 0.354
## 9 0.116
## 5 0.103
## 2 0.099
## 3 0.097
## 10 0.047
## 13 0.036
## 11 0.033
## 6 0.027
## 7 0.027
## 4 0.024
## 12 0.011
## 14 0.010
## 15 0.008
## 8 0.007
## 16 0.002
## Models ranked by AICc(x)
subset(results1, delta <3)
## Global model call: lm(formula = Body_Condition_Factor ~ Red_Coloration_Area + Whiteness_Avg +
## Chroma_Avg + Tint_Avg, data = body_condition_color)
## ---
## Model selection table
## (Int) Chr_Avg Red_Clr_Are Tnt_Avg Wht_Avg df logLik AICc delta
## 1 0.7968 2 30.083 -55.6 0.00
## 9 0.7761 -0.0001772 3 30.268 -53.4 2.23
## 5 0.7866 -0.0001199 3 30.144 -53.1 2.48
## 2 0.7901 0.0002596 3 30.103 -53.1 2.56
## 3 0.7960 5.747e-05 3 30.084 -53.0 2.60
## weight
## 1 0.461
## 9 0.151
## 5 0.134
## 2 0.128
## 3 0.126
## Models ranked by AICc(x)
Model 1 is about 3.05 times more likely than model 9 (0.461/0.151). Model 9 shows an effect of Whiteness_avg. Model 5 shows an effect of Tint_avg. Model 2 shows an effect of Chroma_avg. Lastly, model 3 shows an effect of Red Coloration Area.
Model 9 shows the effect of Whiteness_avg. Model 5 shows the effect of Tint_avg. Model 2 shows the effect of Chroma_avg. Model 3 shows the effect of Red_Coloration_Area.
MuMIn::importance(results1)
## Whiteness_Avg Chroma_Avg Tint_Avg Red_Coloration_Area
## Sum of weights: 0.263 0.226 0.219 0.207
## N containing models: 8 8 8 8
Each variable has about the same weight. Each variable shows up in eight models.
Based on the effects of variables in the models using subset(results1, delta <3) and some other additive combinations, I ran the following lm:
mod1 <- lm(Body_Condition_Factor~Whiteness_Avg, data = body_condition_color)
mod2 <- lm(Body_Condition_Factor~Tint_Avg, data = body_condition_color)
mod3 <- lm(Body_Condition_Factor~Red_Coloration_Area, data = body_condition_color)
mod4 <- lm(Body_Condition_Factor~Chroma_Avg, data=body_condition_color)
mod5 <- lm(Body_Condition_Factor~Whiteness_Avg+Chroma_Avg+Tint_Avg, data=body_condition_color)
out.put_modelselection<-model.sel(mod1,mod2,mod3, mod4, mod5)
out.put_modelselection
## Model selection table
## (Int) Wht_Avg Tnt_Avg Red_Clr_Are Chr_Avg family df
## mod1 0.7761 -0.0001772 gaussian(identity) 3
## mod2 0.7866 -0.0001199 gaussian(identity) 3
## mod4 0.7901 0.0002596 gaussian(identity) 3
## mod3 0.7960 5.747e-05 gaussian(identity) 3
## mod5 0.7791 -0.0009910 0.0001424 -0.0033460 gaussian(identity) 5
## logLik AICc delta weight
## mod1 30.268 -53.4 0.00 0.274
## mod2 30.144 -53.1 0.25 0.242
## mod4 30.103 -53.1 0.33 0.232
## mod3 30.084 -53.0 0.37 0.228
## mod5 30.803 -48.4 4.95 0.023
## Models ranked by AICc(x)
subset(out.put_modelselection, delta <2)
## Model selection table
## (Int) Wht_Avg Tnt_Avg Red_Clr_Are Chr_Avg family df
## mod1 0.7761 -0.0001772 gaussian(identity) 3
## mod2 0.7866 -0.0001199 gaussian(identity) 3
## mod4 0.7901 0.0002596 gaussian(identity) 3
## mod3 0.7960 5.747e-05 gaussian(identity) 3
## logLik AICc delta weight
## mod1 30.268 -53.4 0.00 0.281
## mod2 30.144 -53.1 0.25 0.248
## mod4 30.103 -53.1 0.33 0.238
## mod3 30.084 -53.0 0.37 0.233
## Models ranked by AICc(x)
Model 1 is about 1.13 times more likely than model 2. Model 1 is about 1.18 times more likely than model 4. Lastly, Model 1 is about 1.2 times more likely than model 3.
Now to average the models
model.avg(out.put_modelselection, revised.var = TRUE)
##
## Call:
## model.avg(object = out.put_modelselection, revised.var = TRUE)
##
## Component models:
## '1' '2' '4' '3' '124'
##
## Coefficients:
## (Intercept) Whiteness_Avg Tint_Avg Chroma_Avg
## full 0.7865125 -7.149858e-05 -2.574971e-05 -1.699523e-05
## subset 0.7865125 -2.405057e-04 -9.704388e-05 -6.649717e-05
## Red_Coloration_Area
## full 1.310477e-05
## subset 5.746969e-05
summary(model.avg(out.put_modelselection))
##
## Call:
## model.avg(object = out.put_modelselection)
##
## Component model call:
## lm(formula = <5 unique values>, data = body_condition_color)
##
## Component models:
## df logLik AICc delta weight
## 1 3 30.27 -53.39 0.00 0.27
## 2 3 30.14 -53.15 0.25 0.24
## 4 3 30.10 -53.06 0.33 0.23
## 3 3 30.08 -53.03 0.37 0.23
## 124 5 30.80 -48.45 4.95 0.02
##
## Term codes:
## Whiteness_Avg Tint_Avg Red_Coloration_Area Chroma_Avg
## 1 2 3 4
##
## Model-averaged coefficients:
## (full average)
## Estimate Std. Error Adjusted SE z value Pr(>|z|)
## (Intercept) 7.865e-01 3.652e-02 3.847e-02 20.444 <2e-16 ***
## Whiteness_Avg -7.150e-05 2.743e-04 2.848e-04 0.251 0.802
## Tint_Avg -2.575e-05 2.902e-04 3.067e-04 0.084 0.933
## Chroma_Avg -1.700e-05 1.121e-03 1.173e-03 0.014 0.988
## Red_Coloration_Area 1.310e-05 8.810e-04 9.298e-04 0.014 0.989
##
## (conditional average)
## Estimate Std. Error Adjusted SE z value Pr(>|z|)
## (Intercept) 7.865e-01 3.652e-02 3.847e-02 20.444 <2e-16 ***
## Whiteness_Avg -2.405e-04 4.609e-04 4.819e-04 0.499 0.618
## Tint_Avg -9.704e-05 5.572e-04 5.895e-04 0.165 0.869
## Chroma_Avg -6.650e-05 2.218e-03 2.320e-03 0.029 0.977
## Red_Coloration_Area 5.747e-05 1.844e-03 1.946e-03 0.030 0.976
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
BC1 <- ggplot(body_condition_color, aes(Red_Coloration_Area, Body_Condition_Factor)) +
geom_point() +
geom_smooth(method="lm")
BC2 <- ggplot(body_condition_color, aes(Whiteness_Avg, Body_Condition_Factor)) +
geom_point() +
geom_smooth(method="lm")
BC3 <- ggplot(body_condition_color, aes(Chroma_Avg, Body_Condition_Factor)) +
geom_point() +
geom_smooth(method="lm")
BC4 <- ggplot(body_condition_color, aes(Tint_Avg, Body_Condition_Factor)) +
geom_point() +
geom_smooth(method="lm")
BC1 / BC2 / BC3 / BC4
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
#Select models using Royall’s 1/8 rule for strength of evidence # IMPORTANT: Weights have been renormalized!!
subset(out.put_modelselection, 1/8 < weight/max(out.put_modelselection$weight))
## Model selection table
## (Int) Wht_Avg Tnt_Avg Red_Clr_Are Chr_Avg family df
## mod1 0.7761 -0.0001772 gaussian(identity) 3
## mod2 0.7866 -0.0001199 gaussian(identity) 3
## mod4 0.7901 0.0002596 gaussian(identity) 3
## mod3 0.7960 5.747e-05 gaussian(identity) 3
## logLik AICc delta weight
## mod1 30.268 -53.4 0.00 0.281
## mod2 30.144 -53.1 0.25 0.248
## mod4 30.103 -53.1 0.33 0.238
## mod3 30.084 -53.0 0.37 0.233
## Models ranked by AICc(x)
subset(out.put_modelselection, cumsum(out.put_modelselection$weight) <= .95)
## Model selection table
## (Int) Wht_Avg Tnt_Avg Chr_Avg family df logLik AICc
## mod1 0.7761 -0.0001772 gaussian(identity) 3 30.268 -53.4
## mod2 0.7866 -0.0001199 gaussian(identity) 3 30.144 -53.1
## mod4 0.7901 0.0002596 gaussian(identity) 3 30.103 -53.1
## delta weight
## mod1 0.00 0.366
## mod2 0.25 0.323
## mod4 0.33 0.310
## Models ranked by AICc(x)
sel.table2<-as.data.frame(out.put_modelselection)[6:10]
sel.table2
## family df logLik AICc delta
## mod1 gaussian(identity) 3 30.26827 -53.39369 0.0000000
## mod2 gaussian(identity) 3 30.14440 -53.14594 0.2477518
## mod4 gaussian(identity) 3 30.10326 -53.06366 0.3300296
## mod3 gaussian(identity) 3 30.08401 -53.02516 0.3685350
## mod5 gaussian(identity) 5 30.80259 -48.44728 4.9464058
sel.table2[,2:3]<- round(sel.table2[,2:3],2)
sel.table2[2,4:5]<- round(sel.table2[,4:5],3)
## Warning in `[<-.data.frame`(`*tmp*`, 2, 4:5, value = structure(list(AICc =
## c(-53.394, : replacement element 1 has 5 rows to replace 1 rows
## Warning in `[<-.data.frame`(`*tmp*`, 2, 4:5, value = structure(list(AICc =
## c(-53.394, : replacement element 2 has 5 rows to replace 1 rows
sel.table2[,2:3]
## df logLik
## mod1 3 30.27
## mod2 3 30.14
## mod4 3 30.10
## mod3 3 30.08
## mod5 5 30.80
names(sel.table)[1] = “K”
sel.table2$Model<-rownames(sel.table2)